
__all__ = ["Opt"]

class Field:
    def __init__(self,name = "",row = 1):
        self.name = ""
        self.row = row

    def __str__(self):
        return 'name:{},row:{}'.format(self.name, self.row)

    def fromString(slef,str):
        arr = str.split(':')
        match len(arr):
            case 1:
                 slef.name = arr[0]
            case 2:
                slef.name = arr[0]
                slef.row = int(arr[1])


class Opt:
    def __init__(self):
        self.content = None
        self.field = Field()
        self.dir = ""
        self.sheetName = ""

    def __str__(self):
        return 'dir:{},content:{},sheet:{},field:<{}>'.format(self.dir, self.content,self.sheetName,self.field)
